<% if (obj.totalElements === 0) { %>
<p class="text-warning text-center">
    没有符合查询条件的数据
</p>
<% } else { %>
<table class="table table-striped table-bordered table-hover table-condensed">
    <thead>
    <tr>
        <th><input type="checkbox" name="all-id"></th>
        <th>编码</th>
        <th>名称</th>
        <th>创建人</th>
        <th>创建日期</th>
        <th>修改人</th>
        <th>修改日期</th>
    </tr>
    </thead>
    <tbody>
    <% _.each(obj.datas, function(data) { %>
    <tr data-id="<%=data.id%>">
        <td><input type="checkbox" name="id" value="<%=data.id%>"></td>
        <td><%=data.code%></td>
        <td><%=data.name%></td>
        <td><%=data.creator%></td>
        <td><%=data.createDate%></td>
        <td><%=data.modifier%></td>
        <td><%=data.modifyDate%></td>
    </tr>
    <% }); %>
    </tbody>
</table>
<div class="panel-footer clearfix">
    <div class="pagination pagination-right">
        总记录数 <%= obj.totalElements %> , 总页数 <%= obj.totalPages %> 页
        <ul>
            <% if (obj.hasPrevious) { %>
            <li>
                <button class="btn btn-link" data-page="1">首页</button>
            </li>
            <li>
                <button class="btn btn-link" data-page="<%= obj.previous %>">上一页</button>
            </li>
            <% } %>
            <% _.each(obj.pages, function(page) { %>
            <li>
                <button class="btn btn-link" data-page="<%= page %>"
                <% if (obj.page === page) { %> disabled<% } %>><%= page %></button>
            </li>
            <% }); %>
            <% if (obj.hasNext) { %>
            <li>
                <button class="btn btn-link" data-page="<%= obj.next %>">下一页</button>
            </li>
            <li>
                <button class="btn btn-link" data-page="<%= obj.totalPages %>">尾页</button>
            </li>
            <% } %>
        </ul>
    </div>
</div>
<% } %>